This invention relates to an apparatus for recording digital video images in an endless fashion, and more particularly to an endless video recording apparatus suitable for use to endlessly record digital video images coded using the MPEG which is an international standard of the moving picture coding system.
Endless recording is known as one of recording methods of video images. The endless recording is a technique of overwriting, after video images are recorded fully into an area on a recording medium which allows recording, new video images on the video data recorded formerly beginning with the top of the recording area again to continuously record an object (video images) incessantly without stopping the recording. Conventionally, in order to realize endless recording of video images (moving pictures), a method is employed wherein analog video images are recorded onto a sequential medium such as a VTR (Video Tape Recorder) or a DV (Digital Video).
However, the sequential medium requires rewinding at a point of time when it is recorded up to the last end, and therefore, it cannot be recorded during the rewinding. Further, since the sequential medium cannot be played back while it is being recorded, in order to play back the sequential medium, recording of the sequential medium must be stopped. Furthermore, since the degree of freedom in accessing of the sequential medium is limited to a one-dimensional one, there is a limitation to the range of applications which can be realized.
Therefore, in recent years, attention is attracted to random access media represented by a magnetic disk or a magneto-optical disk in place of sequential media. A random access medium does not require such rewinding as in the case of sequential media and allows incessant recording. Also it is possible to play back the random access medium while it is being recorded, and besides, the random access medium allows free accessing to any area thereon without any restriction. Due to the characteristics described, where endless recording is executed with a random access medium, not only applications to a monitoring system and so forth which are conventionally used applications but also various applications such as recording and playback of digital video images of general broadcasts can be realized.
Incidentally, thanks to the progress of the coding techniques such as the MPEG-1 and the MPEG-2, digitization of video images and audio sound has advanced rapidly. While the digitization makes it possible to provide a very large amount of information simply and less expensively, simultaneously it is significant in what manner such a very large amount of information should be handled. The endless recording is one of methods for handling such a very large amount of information, and it is considered that the endless recording according to digital video images prevails over conventional analog video images in future.
The endless recording according to digital video images, however, has such subjects to be solved as described below.
Even if analog video images are overwritten on video images recorded in the past by endless recording, since video images in the portion following the overwritten portion remain recorded as they are, video images can be played back in a seamless fashion beginning with any portion of the recording medium. However, digital video images cannot be recorded or played back in a seamless fashion only if they are merely overwritten simply. This is because, although digital video images obtained using a compression technique of the MPEG or the like essentially require information for decoding the video images, there is the possibility that the information may be lost by the overwriting.
In particular, video images are coded and recorded for each predetermined frame unit as shown in FIG. 28, and upon such recording, information (header information) for decoding a video image is recorded at the top portion of each coding unit. Taking the MPEG as an example, a GOP (Group of Pictures) which is a coding unit of the MPEG is formed from data of 15 pictures. However, all of the video data do not each form a picture, but only the top data (I data) form one complete picture while each of the following data (P data and B data) represents a difference from the I data. While the MPEG makes it possible to reduce the total amount of information by recording differences from top data in this manner, if the top I data are lost by overwriting by endless recording, then the remaining data (P data and B data) cannot be decoded any more, and upon playback, the played back image is disordered at the portion.
Compression coding systems for digital video images are classified into those wherein the size of a coding unit upon compression is fixed like the compression coding system for the DV and those wherein the size after compression varies for each coding unit depending upon contents of video images to be compressed like the MPEG, and the subject described above is significant particularly in the latter case. In the former case, since the size of a coding unit is fixed, if a recording area is set in accordance with the size of a coding unit, then video images of a coding unit can be overwritten such that they do not span two coding units recorded formerly. However, in video images wherein the magnitude varies for each coding unit as in the MPEG, a coding unit thereof sometimes spans two coding units recorded formerly. In this instance, the header information of a coding unit recorded formerly is lost by overwriting.
The present invention has been made in view of such subjects as described above, and it is a first object of the present invention to provide an endless video recording apparatus which can seamlessly play back digital video images recorded in an endless fashion.
Further, in the conventional endless recording, a fixed area is determined and endless recording is executed within the range of the fixed area. However, since both of the magnetic disk and the magneto-optical disk have a limitation in the recording capacity of the medium, although data which should be recorded preferentially to data which should be recorded endlessly are present, it is sometimes impossible to record the data because the capacity which can be used for recording other than endless recording is small. Also it sometimes occurs conversely that the other area than the endless recording area remains blank without being used. Accordingly, from the point of view of effective utilization of a recording area limited in this manner, preferably the recording range to which endless recording is applied is varied in accordance with the situation.
Therefore, it is a second object of the present invention to provide an endless video recording apparatus which can perform endless recording while varying the recording range for endless recording in accordance with the situation to efficiently utilize the recording area.
Further, in the conventional endless recording, the order in which data are erased by overwriting when endless recording is performed relies upon the time. Therefore, video images which the user principally wants to enjoy are sometimes erased or recorded by endless recording independently of the will of the user.
Therefore, it is a third object of the present invention to provide an endless video recording apparatus which can preferentially leave those data which the user principally wants to enjoy when endless recording is performed.
In order to attain the first object described above, an endless video recording apparatus of an aspect of the present invention is characterized in that it comprises video data recording means for recording video data coded in accordance with the MPEG system for each particular unit formed from at least one or more GOPs (Groups of Pictures) into an endless recording area secured in a recording medium and recording, where video data are recorded fully in the endless recording area, new video data in an overwriting relationship on the video data recorded formerly in the endless recording area, mark setting means for setting marks to the particular units, mark management means for recording the positions of the marks, the sizes of the particular units corresponding to the marks and the positions of AAUs (Audio Access Units) corresponding to the GOPs, which form the particular units, in a coordinated relationship with the marks into a database, mark erasure means for erasing a mark corresponding to an old particular unit which overlaps with an area into which a new particular unit should be recorded from the database, and playback allowing area setting means for referring to the database to set a playback allowing area, and that, when a mark is erased by the mark erasure means, the video data recording means rewrites an AAU corresponding to the erased mark into a padding stream based on the relationship between the marks and the AAUs recorded in the database and records the padding stream.
With the endless video recording apparatus, even if video data recorded formerly are destroyed by overwriting of new video data, the playback allowing area can be set except the area of the destroyed video data by referring to the database. Consequently, there is an advantage that seamless video playback can be achieved without suffering from a disorder of video images caused by playback of the destroyed video data. Further, the playback allowing area varies together with the database and is updated every time a mark is set/erased. Consequently, there is another advantage that seamless video playback can always be achieved even when playback is performed while endless recording is proceeding. Furthermore, there is an advantage that outputting of data only of audio sound free from a video image which arises from a remaining AAU corresponding to a GOP erased by overwriting can be prevented.
Preferably, the mark erasure means sets a predetermined range with respect to the position of one of the set marks as an overwrite allowing area and erases a mark or marks included in the set overwrite allowing area from within the database. In this instance, the playback allowing area can be set based only on the position of the set mark. Consequently, there is an advantage that it is possible to set a playback allowing area before the size of a particular unit is specified.
The mark erasure means may specify an area into which the new particular unit is to be recorded based on the positions of the marks and the size of the new particular unit and erase a mark or marks included in the specified area from within the database. In this instance, there is an advantage that a playback allowing area can be set with a higher degree of accuracy, and this is effective where the dispersion in size among the particular units is great.
Preferably, the playback allowing area setting means sets an area from the mark whose recording time is oldest to the last end of a particular unit corresponding to the mark whose recording time is newest as the play back allowing area. By this configuration, there is an advantage that the range over which playback is possible while endless recording is proceeding can be set to the maximum.
Further, in order to attain the first object described above, an endless video recording apparatus of another aspect of the present invention is characterized in that it comprises video decomposition means for decomposing video data coded in accordance with the MPEG system for each particular unit formed from at least one or more GOPs, video data recording means for embedding the decomposed video data into recording units of a particular size and recording the recording units into an endless recording area secured in a recording medium and for recording, where the recording units are recorded fully in the endless recording area, a new recording unit in an overwriting relationship on one of the recording units recorded formerly in the endless recording area, and a database in which a relationship between GOPs recorded in the recording units and AAUs corresponding to the GOPs is recorded, and that, when a GOP recorded in an old recording unit is erased by overwriting recording on a recording unit in which new video data are embedded, the video data recording means rewrites an AAU corresponding to the erased GOP into a padding stream based on the relationship between the GOPs and the AAUs recorded in the database and records the padding stream.
With the endless video recording apparatus, even where there is a dispersion in size of the particular unit of video data, since old video data recorded formerly are erased completely by overwriting of new recording units by successively recording video data for each recording unit of a predetermined size, no part of the video data recorded formerly remains at all. Accordingly, there is an advantage that seamless video playback can be achieved without suffering from occurrence of a disorder of video images by playback of destroyed video data. Further, since the video data recorded formerly are erased completely, there is an advantage also that a playback allowing area in the endless recording area need not be searched for every time playback is started. Furthermore, there is an advantage that outputting of data only of audio sound free from a video image which arises from a remaining AAU corresponding to a GOP erased by overwriting can be prevented.
Preferably, the video data recording means embeds a padding stream into a free area in each of the recording units in which the decomposed video data are embedded and records the resulting recording units. By this configuration, there is no necessity to remove an invalid data portion in a recording unit upon playback any more, and there is an advantage that video data can be decoded and played back while keeping its matching property as a data stream of the MPEG.
Preferably, the endless video recording apparatus comprises mark setting means for setting a mark for each of the particular units, mark management means for coordinating the relationship between the GOPs and the AAUs corresponding to the GOPs with the marks and recording the positions of the marks in the endless recording area into the database, and mark erasure means for erasing a mark corresponding to old video data which are to be erased by overwriting recording of a recording unit in which new video data are embedded from within the database. By this configuration, there is an advantage that the use of a mark makes it possible to readily search for the position of a recording unit in the endless recording area.
Furthermore, in order to attain the first object described above, an endless video recording apparatus of a further aspect of the present invention is characterized in that it comprises file preparation means for preparing a plurality of files in an endless recording area secured in a recording medium, video data recording means for successively recording video data coded in accordance with the MPEG system in a particular unit formed from at least more than one GOP for each of the files, and a database in which a relationship between the GOPs recorded in the files and AAUs corresponding to the GOPs is recorded, that, when video data are recorded fully into the recording areas of all of the files, the file preparation means deletes one of the plurality of files and prepares a new file, and that, when one of the files is deleted, the video data recording means rewrites an AAU corresponding to a GOP erased upon the deletion of the file into a padding stream based on the relationship between the GOPs and the AAUs recorded in the database and records the padding stream.
With the endless video recording apparatus, even where there is a dispersion in size of the particular unit of video data, since old video data recorded formerly are erased completely by deletion of a file, no part of the video data recorded formerly remains at all. Accordingly, there is an advantage that seamless video playback can be achieved without suffering from occurrence of a disorder of video images by playback of destroyed video data. Further, there is an advantage also that endless recording can be continued without performing control in a unit of a mark or control in a recording unit. Furthermore, where the video data are recorded in a unit of at least more than one GOP into the files, there is an advantage that it can be prevented that one GOP is recorded divisionally into two files. In addition, there is an advantage that outputting of data only of audio sound free from a video image which arises from a remaining AAU corresponding to a GOP erased by overwriting can be prevented.
Preferably, the endless video recording apparatus comprises mark setting means for setting a mark to the video data to be recorded for each particular unit, and mark management means for recording the positions of the marks in the endless recording area into the database. According to configuration, there is an advantage that the use of a mark makes it possible to readily search for the position of a particular unit on the endless recording area.
Further, in the aspects of the present invention described above, preferably a database recording area is secured in the recording medium, and the mark management means records the database at predetermined intervals of time into the database recording area. If the database is recorded onto the recording medium every time it is updated, then processing other than recording of video data is required, and this gives rise to deterioration of the performance of the system. However, by recording the database at the predetermined intervals of time in this manner, there is an advantage that the latest information can be stored onto the recording medium while suppressing deterioration of the system.
A database recording area may be secured in the recording medium, and the mark management means may record the database once into temporary recording means and record the database into the database recording area when the database is updated by a predetermined number of times in the temporary recording means. In this instance, since accessing to the recording medium does not occur when the database is not updated, there is an advantage that deterioration of the system can be further suppressed.
Furthermore, a database recording area maybe secured in the recording medium, and the mark management means may record, during endless recording, the database into temporary recording means and record the database into the database recording area at a point of time when the endless recording is completed. In this instance, although information remains not stored until endless recording comes to an end, since accessing other than recording of video data does not occur during recording of video data, there is an advantage that deterioration of the performance of the system can be prevented.
Further, in the aspects of the present invention described above, preferably the endless video recording apparatus comprises video playback means for searching for a playback starting point in a unit of a mark from within the database and reading out video data of a particular unit corresponding to the searched out mark from the endless recording area to start playback of the video data. When playback is performed while endless recording is proceeding, while it is necessary to set from what location the playback should be started, by searching using a mark in this manner, there is an advantage that the playback starting location can be set readily and quickly.
Meanwhile, in order to attain the second object described above, in the aspects of the present invention described above, the endless video recording apparatus comprises endless recording area setting means for dynamically and adjustably setting the endless recording area in accordance with increase or decrease of the free area in the recording medium. According to this configuration, there is an advantage that the recording area in the recording medium can be utilized efficiently.
In this instance, preferably, when a releasing request is received from another application, the endless recording area setting means releases the endless recording area in accordance with the releasing request. According to this configuration, there is an advantage that endless recording can be continued without disturbing execution of an important application.
The endless video recording apparatus may comprise endless recording area setting means for setting a predetermined area in the recording medium as the endless recording area preferentially to a request from any other application. In this instance, there is an advantage that an endless recording area can be secured with certainty in the recording medium and endless recording can be performed with certainty irrespective of the situation of execution of another application.
Further preferably, the endless video recording apparatus comprises header recording area setting means for setting a header recording area into which basic information of recorded video images should be recorded in the recording medium separately from the endless recording area. According to this configuration, there is an advantage that basic information necessary for playback of video data can be stored with certainty.
On the other hand, in order to attain the third object described above, in the aspects of the invention described above, the endless video recording apparatus is configured such that it comprises priority setting means for setting, for each of video contents, a priority with which a record of the video contents should be left, that the mark management means records the priorities set by the priority setting means in a corresponding relationship to the marks into the database, and that the video data recording means searches, where video data are recorded fully in the endless recording area, for a mark corresponding to video contents having a low priority from within the database and records new video data in an overwriting relationship on the video data corresponding to the searched out mark. According to the configuration, if the user sets a priority for each of video contents in advance, then the video data are erased beginning with those which have a low priority. Consequently, there is an advantage that endless recording can be performed while data which the user principally wants to enjoy are left preferentially.
In this instance, preferably, where a plurality of video data having an equal priority are recorded, the video data recording means overwrites the new video data on the video data of the equal priority beginning with the video data whose recording time is old. According to this configuration, there is an advantage that a video image which has a higher priority and is newer can be left for a longer period of time.
Further preferably, the mark management means further records recording terms of the recorded video data in a corresponding relationship to the marks into the database, and, where video data are recorded fully in the endless recording area, the video data recording means searches for a mark corresponding to video contents having a low priority among those video data whose recording term has expired from within the database and records the new video data in an overwriting relationship on the video data corresponding to the searched out mark. According to this configuration, there is an advantage that, if the user set the time, within which the video data are, according to the recognition of the user, valuable as information, is set as a recording term, then endless recording can be performed while preferentially leaving those data which are high in degree of freshness of information and high in priority of video contents.
Where a video image is recorded into a file, preferably the endless video recording apparatus is configured such that it comprises priority setting means for setting, for each of video contents, a priority with which a record of the video contents should be left, and file selection means for selecting a file into which the inputted video data should be recorded in accordance with the priority set by the priority setting means, that the video data recording means records the video data into the file selected by the file selection means, and that, when video data are recorded fully in the recording areas of all of the files, the file preparation means deletes a file in which video data having a low priority are recorded and prepares a new file. According to this configuration, if the user sets a priority for each video contents, then the video data are erased beginning with those which have a low priority. Consequently, there is an advantage that endless recording can be performed while data which the user principally wants to enjoy are left preferentially.